//
//  MPlusMedicineBaikeTableViewCell.m
//  medicineplus
//
//  Created by gufei on 15-5-18.
//  Copyright (c) 2015年 chn_ruby@126.cn. All rights reserved.
//

#import "MPlusMedicineBaikeTableViewCell.h"
#import "MPlusDefine.h"

#define IMAGE_HEIGHT_80 80
#define IMAGE_WIDTH (SCREEN_WIDTH-PADDING_5*2-PADDING_10*2)/3
#define CELL_HEIGHT 132

@implementation MPlusMedicineBaikeTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        _aTitle = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10, PADDING_10, (SCREEN_WIDTH-PADDING_10*3)/3*2, LABEL_HEIGHT_22)];
        _aTitle.font = [UIFont systemFontOfSize:[kFontSize16 floatValue]];
        [self addSubview:_aTitle];
        
        _aTime = [[UILabel alloc] initWithFrame:CGRectMake((PADDING_10*2+SCREEN_WIDTH-PADDING_10*3)/3*2, PADDING_10, (SCREEN_WIDTH-PADDING_10*3)/3, LABEL_HEIGHT_22)];
        _aTime.font = [UIFont systemFontOfSize:[kFontSize12 floatValue]];
        _aTime.textAlignment = NSTextAlignmentRight;
        _aTime.textColor = [UIColor lightGrayColor];
        [self addSubview:_aTime];
        
        _aImage1 = [[UIImageView alloc] initWithFrame:CGRectMake(PADDING_10, PADDING_10*2+LABEL_HEIGHT_22, IMAGE_WIDTH, IMAGE_HEIGHT_80)];
        [self addSubview:_aImage1];
        
        _aImage2 = [[UIImageView alloc] initWithFrame:CGRectMake(PADDING_10+PADDING_5+IMAGE_WIDTH, PADDING_10*2+LABEL_HEIGHT_22, IMAGE_WIDTH, IMAGE_HEIGHT_80)];
        [self addSubview:_aImage2];
        
        _aImage3 = [[UIImageView alloc] initWithFrame:CGRectMake(PADDING_10+PADDING_5*2+IMAGE_WIDTH*2, PADDING_10*2+LABEL_HEIGHT_22, IMAGE_WIDTH, IMAGE_HEIGHT_80)];
        [self addSubview:_aImage3];
        
        _aIntro = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10+PADDING_5+IMAGE_WIDTH, PADDING_10*2+LABEL_HEIGHT_22, SCREEN_WIDTH-PADDING_10*2-PADDING_5-IMAGE_WIDTH, IMAGE_HEIGHT_80)];
        _aIntro.lineBreakMode = NSLineBreakByWordWrapping;
        _aIntro.numberOfLines = 0;
        _aIntro.font = [UIFont systemFontOfSize:[kFontSize14 floatValue]];
        _aIntro.textColor = [UIColor lightGrayColor];
        [self addSubview:_aIntro];
    }
    return self;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
